from datetime import datetime
from typing import Literal

from .classdef import InstrumentData

type TypeDateTime = datetime
"""时间类型"""

type TypeProduct = Literal["1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "h"]
"""品种类型"""

type TypeInstResult = dict[TypeProduct, list[InstrumentData | str]]
"""合约信息数据类型"""

type TypeOrderDIR = Literal["buy", "sell"]
"""报单方向"""

type TypeHedgeFlag = Literal["1", "2", "3", "4", "5"]
"""投机套保标志"""

type TypeOrderFlag = Literal["GFD", "FAK", "FOK"]
"""报单指令"""

type TypeOffsetFlag = Literal["0", "1", "3"]
"""开平标志"""
